package com.unipock.pay.vo.auth;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.wxiaoqi.security.common.util.DateUtil;

@Entity
@Table(name = "t_department")
public class Department {

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "department_id", length = 36)
	public String id;
	/**
	 * 部门名称
	 */
	@Column(name = "department_name", length = 50)
	public String name;

	/**
	 * 所属公司
	 */
	@Column(name = "company_id", length = 36)
	public String companyId;

	/**
	 * 角色描述
	 */
	@Column(name = "remark", length = 255)
	public String remark;

	/**
	 * 是否启用
	 */
	@Column(name = "is_enabled")
	public Boolean enabled;

	/**
	 * 录入日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "added_date")
	@JsonFormat(pattern = DateUtil.DATE_TIME_FORMAT_PATTERN, timezone = "GMT+8")
	public Date addedDate;

}
